/**
 * 
 */
package systole.domain.analysis.results;

import java.io.Serializable;
import java.text.DecimalFormat;

/**
 * @author juan
 *
 */
public class AnalysisResult implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = -6104738914471417928L;
    /**
     * Id of result analysis.
     */
    private Integer id;
    private ParameterIAR iar;
    private ParameterAOD aod;
    private ParameterAOS aos;
    private ParameterT t;
    private Float heartRate;

    /**
     *
     */
    public AnalysisResult() {
        super();
    }

    /**
     * @return the id
     */
    public Integer getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return the iar
     */
    public ParameterIAR getIar() {
        return this.iar;
    }

    /**
     * @param iar the iar to set
     */
    public void setIar(ParameterIAR iar) {
        this.iar = iar;
    }

    /**
     * @return the aod
     */
    public ParameterAOD getAod() {
        return this.aod;
    }

    /**
     * @param aod the aod to set
     */
    public void setAod(ParameterAOD aod) {
        this.aod = aod;
    }

    /**
     * @return the aos
     */
    public ParameterAOS getAos() {
        return this.aos;
    }

    /**
     * @param aos the aos to set
     */
    public void setAos(ParameterAOS aos) {
        this.aos = aos;
    }

    /**
     * @return the t
     */
    public ParameterT getT() {
        return this.t;
    }

    /**
     * @param t the t to set
     */
    public void setT(ParameterT t) {
        this.t = t;
    }

    /**
     * @return the heartRate
     */
    public Float getHeartRate() {
        return heartRate;
    }

    /**
     * @param heartRate the heartRate to set
     */
    public void setHeartRate(Float heartRate) {
        this.heartRate = heartRate;
    }

    /**
     * @return the heartRate as string
     */
    public String getHeartRateAsString() {
        DecimalFormat format = new DecimalFormat("###0.00");
        return format.format(this.heartRate != null ? this.heartRate.floatValue() : 0f);
    }
}
